﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using System.Data;

public partial class ViewPerformance : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //LoadGroup();

            DataTable dt = new DataTable();
            dt = PerformanceDAL.GetUserBasedOnRole("Student");
            lvStudent.DataSource = dt;
            lvStudent.DataBind();
        }
        //MembershipUserCollection users = new MembershipUserCollection();
        //string[] users = Roles.GetUsersInRole("Student");
        
    }

    //private void LoadGroup()
    //{
    //    ddlGroup.Items.Clear();
    //    DataTable dt = new DataTable();
    //    dt = PerformanceDAL.GetGroup();
    //    ddlGroup.Items.Add("--Select One--");
    //    ddlGroup.SelectedIndex = ddlGroup.Items.IndexOf(ddlGroup.Items.FindByText("--Select One--"));
    //    //ListItem list = new ListItem();
    //    //list.Text = "All";
    //    //list.Value = "0";
    //    //ddlGroup.Items.Add(list);
    //    for (int i = 0; i < dt.Rows.Count; i++)
    //    {
    //        ListItem li = new ListItem();
    //        li.Text = dt.Rows[i][1].ToString();
    //        li.Value = dt.Rows[i][0].ToString();
    //        ddlGroup.Items.Add(li);
    //    }
    //}
    //protected void ddlGroup_SelectedIndexChanged(object sender, EventArgs e)
    //{
    //    if (ddlGroup.SelectedIndex > 0)
    //    {
    //        DataTable dt = new DataTable();
    //        dt = PerformanceDAL.GetUserBasedOnRole("Student");
    //        lvStudent.DataSource = dt;
    //        lvStudent.DataBind();
    //    }
    //}
}